import request from "@/utils/http/request";
console.log(request, "request");
// 获取活体人脸验证结果
export function getResult(obj: { bizId: String }) {
  return request({
    url: `client/face/result`,
    method: "POST",
    params: obj,
  });
}
// 获取商品详情
export function getOrderDes(obj: any) {
  return request({
    url: `new/order/detail`,
    method: "POST",
    headers: { "content-type": "application/x-www-form-urlencoded" },
    data: obj,
  });
}
// 微信公众号页面授权后发起支付
export function getAuthorizePay(obj: any) {
  return request({
    url: `wechat/pay/authorizePay`,
    method: "POST",
    headers: { "content-type": "application/json" },
    data: obj,
  });
}
// 风控接口
// export function getAuthRisk(data: {
//   dataJsonOne: {
//     name: String;
//     id_card: String;
//     mobile: String;
//   };
//   dataJsonTwo: {
//     name: String;
//     idNo: String;
//     mobile: String;
//   };
//   dataJsonThree: {
//     mobile: String;
//   };
// }) {
//   return request({
//     url: `xuaneRequest/xuanbeRiskManagement`,
//     method: "post",
//     data: data,
//   });
// }

// 用户手动填写身份证号和姓名调用（不上传身份证和人脸认证）
export function submitInfo(data: any) {
  return request({
    url: `client/submit/identityInfo`,
    method: "post",
    // params: data,
    data: data,
    hideLoading: true,
    extra: { loading: false },
  });
}
//
// proxy.$http.getBlackList({ ...params1 }).then((faceRes) => {
//   uni.showToast({ title: faceRes.msg, icon: "none" });
//   proxy.$http.getAuthRisk(params2).then((faceRes) => {
//     uni.showToast({ title: '人脸识别成功，请继续下一步~', icon: "none" });
//     uni.navigateBack();
//   });
// });
//
//getBlackList 黑名单
export function getBlackList(data: any) {
  return request({
    url: `landingPage/isBlackList`,
    method: "post",
    data: data,
    hideLoading: true,
  });
}

// getAuthRisk 风控
export function getAuthRisk(data: any) {
  return request({
    url: `landingPage/xuanbeRiskManagement`,
    method: "post",
    params: data,
    hideLoading: true,
  });
}
